<?php
if (!defined('APP_PATH')) {
	define('APP_PATH', $_SERVER['DOCUMENT_ROOT']."/bdACPA");
}
require_once(APP_PATH.'/required.php');
// require('../setup.inc.php');
// include('../auth.php');

//set content type and xml tag
header("Content-type:text/xml");
echo("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");

$out = "";
$out .=  "<items>";
$out .= "	<item type='settings' width='1200' position='label-left' inputWidth='240'/>";
$out .= "	<item type='block' width='1200' >";

$out .= "		<item type='fieldset' width='220' label='Position'>";
$out .= "			<item type='hidden' name='idcnv' value='' validate='NotEmpty,ValidInteger' />";
$out .= "			<item type='hidden' name='idpuce' value='' validate='NotEmpty,ValidInteger'/>";
$out .= "		<item type='combo' name='chromosome' inputWidth='50' label='Chromosome' validate='NotEmpty' readonly='1'>";
$out .= "			<option value='1' text='1'/>";
$out .= "			<option value='2' text='2'/>";
$out .= "			<option value='3' text='3'/>";
$out .= "			<option value='4' text='4'/>";
$out .= "			<option value='5' text='5'/>";
$out .= "			<option value='6' text='6'/>";
$out .= "			<option value='7' text='7'/>";
$out .= "			<option value='8' text='8'/>";
$out .= "			<option value='9' text='9'/>";
$out .= "			<option value='10' text='10'/>";
$out .= "			<option value='11' text='11'/>";
$out .= "			<option value='12' text='12'/>";
$out .= "			<option value='13' text='13'/>";
$out .= "			<option value='14' text='14'/>";
$out .= "			<option value='15' text='15'/>";
$out .= "			<option value='16' text='16'/>";
$out .= "			<option value='17' text='17'/>";
$out .= "			<option value='18' text='18'/>";
$out .= "			<option value='19' text='19'/>";
$out .= "			<option value='20' text='20'/>";
$out .= "			<option value='21' text='21'/>";
$out .= "			<option value='22' text='22'/>";
$out .= "			<option value='X' text='X'/>";
$out .= "			<option value='Y' text='Y'/>";

$out .= "		</item>";
$out .= "			<item type='input' width='150' name='positiondebut' label='Début du CNV (pb)' value='' validate='NotEmpty,ValidInteger' />";
$out .= "			<item type='input' width='150' name='sondedebut' label='Sonde de début' value='' />";
$out .= "			<item type='input' width='150' name='positionfin' label='Fin du CNV (pb)' value='' validate='NotEmpty,ValidInteger' />";
$out .= "			<item type='input' width='150' name='sondefin' label='Sonde de fin' value='' />";
$out .= "			<item type='input' width='150' name='log2ratio' label='Log2Ratio' value='' />";
$out .= "			<item type='input' width='150' name='nbcopie' label='Nombre de copies' value='' />";
$out .= "		</item>";



$out .= "		<item type='newcolumn' offset='50'/>";
$out .= "		<item type='fieldset' width='520' label='Annotations'>";

$out .= "			<item type='combo' name='classification' inputWidth='400' label='Classification du CNV' validate='NotEmpty' readonly='1'>";
$classs = $TYPECLASSIFICATION_DAO->rechercher_type_classification();
foreach ( $classs as $class){
	$out .= "				<option value='".intval($class->idtypeclassification)."' text='".$class->libelle."'/>";
}
$out .= "			</item>";
$out .= "			<item type='input' name='commentaire' inputWidth='400' label='Commentaire' tooltips='commentaire justifiant la classification' value='' rows='10'/>";



$out .= "			<item type='combo' name='verifie' inputWidth='400' label='Véification?' validate='NotEmpty' readonly='1'>";
$verifs = $TYPEVERIF_DAO->rechercher_type_verif(null);
foreach ( $verifs as $verif){
$out .= "				<option value='".intval($verif->idtypeverif)."' text='".$verif->libelle."'/>";
}
$out .= "			</item>";

$out .= "			<item type='combo' name='methode' inputWidth='400' label='Méthode de vérification' validate='NotEmpty' readonly='1'>";
$out .= "				<option value='0' text='pas de vérification'/>";

$meths = $TYPEMETHODEVERIF_DAO->rechercher_type_methode_verif();
foreach ( $meths as $meth){
	$out .= "				<option value='".intval($meth->idtypemethodeverif)."' text='".$meth->libelle."'/>";
}
$out .= "			</item>";

$out .= "			<item type='combo' name='herite' inputWidth='400' label='CNV hérité?' validate='NotEmpty' readonly='1'>";
$herits = $TYPEHERITE_DAO->rechercher_type_herite();
foreach ( $herits as $herit){
	$out .= "				<option value='".intval($herit->idtypeherite)."' text='".$herit->libelle."'/>";
}
$out .= "			</item>";




$out .= "	</item>";
$out .= "	</item>";

$out .= "</items>";
print($out);
?>